export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: 'admin',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: 'sub-page',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'list.table-list',
    icon: 'table',
    path: '/list',
    component: './TableList',
  },
  {
    name: 'goods',
    icon: 'table',
    path: '/goods',
    routes: [
      {
        path: '/goods',
        redirect: '/goods/management',
      },
      {
        title: '商品管理',
        name: 'goods-management',
        icon: 'table',
        path: '/goods/management',
        component: './goods/management',
      },
      {
        title: '商品分类',
        name: 'goods-classify',
        icon: 'table',
        path: '/goods/classify',
        component: './goods/classify',
      },
      {
        title: '商品评价',
        name: 'goods-comment',
        icon: 'table',
        path: '/goods/comment',
        component: './goods/comment',
      },
      {
        title: '商品规格',
        name: 'goods-spec',
        icon: 'table',
        path: '/goods/spec',
        component: './goods/spec',
      },
      {
        title: '添加商品',
        name: 'goods-add',
        path: '/goods/add',
        component: './goods/addgoods',
        hideInMenu: true,
      },
    ],
  },
  // 订单
  {
    name: 'dingdan',
    path: '/dingdan',
    routes: [
      // 默认第一个
      {
        path: '/dingdan',
        redirect: '/dingdan/guanli',
      },
      // 订单管理
      {
        title: '订单管理',
        name: 'guanli',
        path: '/dingdan/guanli',
        component: './dingdan/guanli',
      },
      // 订单概述
      {
        title: '订单概述',
        name: 'gaishu',
        path: '/dingdan/gaishu',
        component: './dingdan/gaishu',
      },
      // 评价管理
      {
        title: '评价管理',
        name: 'pingjia',
        path: '/dingdan/pingjia',
        component: './dingdan/pingjia',
      },
      // 订单配送
      {
        title: '订单配送',
        name: 'peisong',
        path: '/dingdan/peisong',
        component: './dingdan/peisong',
      },
    ],
  },
  {
    name: 'marketing',
    icon: 'table',
    path: '/marketing',
    routes: [
      {
        name: 'seckill',
        icon: 'table',
        path: '/marketing/seckill',
        routes: [
          {
            name: 'seckillMoment',
            icon: 'table',
            path: '/marketing/seckill/seckillMoment',
            component: './marketing/seckill/seckillMoment/SeckillMoment.jsx',
          },
          {
            name: 'seckillGoods',
            icon: 'table',
            path: '/marketing/seckill/seckillGoods',
            component: './marketing/seckill/seckillGoods/SeckillGoods.jsx',
          },
        ],
      },
      {
        name: 'bargain',
        icon: 'table',
        path: '/marketing/bargain',
        routes: [
          {
            name: 'bargainMoment',
            icon: 'table',
            path: '/marketing/bargain/bargainMoment',
            component: './marketing/bargain/bargainMoment/BargainMoment.jsx',
          },
          {
            name: 'bargainGoods',
            icon: 'table',
            path: '/marketing/bargain/bargainGoods',
            component: './marketing/bargain/bargainGoods/BargainGoods.jsx',
          },
        ],
      },
      {
        name: 'live',
        icon: 'table',
        path: '/marketing/live',
        routes: [
          {
            name: 'liveMoment',
            icon: 'table',
            path: '/marketing/live/liveMoment',
            component: './marketing/live/liveMoment/LiveMoment.jsx',
          },
          {
            name: 'liveGoods',
            icon: 'table',
            path: '/marketing/live/liveGoods',
            component: './marketing/live/liveGoods/LiveGoods.jsx',
          },
        ],
      },
      {
        name: 'group',
        icon: 'table',
        path: '/marketing/group',
        routes: [
          {
            name: 'groupMoment',
            icon: 'table',
            path: '/marketing/group/groupMoment',
            component: './marketing/group/groupMoment/GroupMoment.jsx',
          },
          {
            name: 'groupGoods',
            icon: 'table',
            path: '/marketing/group/groupGoods',
            component: './marketing/group/groupGoods/GroupGoods.jsx',
          },
        ],
      },
    ],
  },
  {
    name: 'love',
    icon: 'table',
    path: '/love',
    routes: [
      {
        path: '/love',
        redirect: '/love/black',
      },
      {
        title: '超级会员',
        name: 'love-black',
        icon: 'table',
        path: '/love/black',
        component: './love/black',
      },
      {
        title: '代理商',
        name: 'love-deeppink',
        icon: 'table',
        path: '/love/deeppink',
        component: './love/deeppink',
      },
      {
        title: '运营商',
        name: 'love-gold',
        icon: 'table',
        path: '/love/gold',
        component: './love/gold',
      },
      {
        title: '佣金记录',
        name: 'love-green',
        icon: 'table',
        path: '/love/green',
        component: './love/green',
      },
      {
        title: '会员审核',
        name: 'love-pink',
        icon: 'table',
        path: '/love/pink',
        component: './love/pink',
      },
      {
        title: '设置',
        name: 'love-plum',
        icon: 'table',
        path: '/love/plum',
        component: './love/plum',
      },
    ],
  },
  {
    name: 'luyou',
    icon: 'smile',
    path: '/luyou',
    routes: [
      {
        path: '/luyou',
        redirect: '/luyou/top1',
      },
      {
        name: 'apply-for-the-list',
        title: '申请列表',
        icon: 'smile',
        path: '/luyou/top1',
        component: './luyou/top1',
      },
      {
        name: 'configuration',
        title: '配置',
        icon: 'smile',
        path: '/luyou/top2',
        component: './luyou/top2',
      },
      {
        name: 'shop',
        title: '门店',
        icon: 'smile',
        path: '/luyou/top3',
        component: './luyou/top3',
      },
      {
        name: 'commodity',
        title: '商品',
        icon: 'smile',
        path: '/luyou/top4',
        component: './luyou/top4',
      },
      {
        name: 'order-for-goods',
        title: '订单',
        icon: 'smile',
        path: '/luyou/top5',
        component: './luyou/top5',
      },
      {
        name: 'withdraw-deposit',
        title: '提现',
        icon: 'smile',
        path: '/luyou/top6',
        component: './luyou/top6',
      },
      {
        name: 'store-payment',
        title: '到店付款',
        icon: 'smile',
        path: '/luyou/top7',
        component: './luyou/top7',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
